package com.bdqn.service.impl;

import com.bdqn.dao.PetDao;
import com.bdqn.entity.Pet;
import com.bdqn.service.PetService;

import java.util.List;

public class PetServiceImpl implements PetService {
    PetDao petDao;

    public PetDao getPetDao() {
        return petDao;
    }

    public void setPetDao(PetDao petDao) {
        this.petDao = petDao;
    }

    //获取所有宠物信息
    @Override
    public List<Pet> getPetList() {return petDao.getPetList();}

    //增加宠物信息
    @Override
    public int addPet(Pet pet) {
        return petDao.addPet(pet);
    }

    //删除宠物信息
    @Override
    public int deletePet(Integer petId) { return petDao.deletePet(petId); }

    //修改宠物信息
    @Override
    public int updatePet(Pet pet) { return petDao.updatePet(pet); }

    //根据品种查询宠物信息
    @Override
    public Pet getPetByBreed(Integer Breed) {
        return petDao.getPetByBreed(Breed);
    }

}
